/**
 * @projectName: project02bywdmtz
 * @package: com.cskaoyan.controller
 * @className: RegionLIst
 * @author: 冉夏
 * @description: TODO
 * @date: 2022/12/30 18:50
 * @version: 1.8
 */

package com.cskaoyan.controller;

import com.cskaoyan.bean.MarketRegion;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;

import com.cskaoyan.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
//简简单单 哈哈哈20分钟搞定
@RestController
@RequestMapping("admin/region")
public class RegionListController {
    /*
    * 行政区域的信息回显
    * */
    @Autowired
    RegionService regionService;
    @RequestMapping("list")
    public BaseRespVo showRegionInfo(){
        //写commonData里面的数据
           CommonData<MarketRegion> commonData =regionService.getAllRegionInfo();
            return BaseRespVo.ok(commonData);
    }

}
